home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / mac / files / t_sys5 / unixcpio.gz / unixnet.cpio / session.h < prev    next >
C/C++ Source or Header  |  1994-07-11  |  963b  |  43 lines

  1. extern int mode;
  2. #define    CMD_MODE    1    /* Command mode */
  3. #define    CONV_MODE    2    /* Converse mode */
  4.  
  5. /* Session control structure; only one entry is used at a time */
  6. struct session {
  7.     int type;
  8. #define    FREE    0
  9. #define    TELNET    1
  10. #define    FTP    2
  11. #define    AX25TNC    3
  12. #define FINGER    4
  13. #define NRSESSION 5
  14.  
  15.     char *name;    /* Name of remote host */
  16.     union {
  17.         struct ftp *ftp;
  18.         struct telnet *telnet;
  19. #ifdef    AX25
  20.         struct ax25_cb *ax25_cb;
  21. #endif
  22. #ifdef    _FINGER
  23.         struct finger *finger;
  24. #endif
  25. #ifdef    NETROM
  26.         struct nr4cb *nr4_cb ;
  27. #endif
  28.     } cb;
  29.     int (*parse)();        /* Where to hand typed input when conversing */
  30.     FILE *record;        /* Receive record file */
  31.     char *rfile;        /* Record file name */
  32.     FILE *upload;        /* Send file */
  33.     char *ufile;        /* Upload file name */
  34.     char noecho;        /* Echo flag */
  35. };
  36. #define    NULLSESSION    (struct session *)0
  37. extern unsigned nsessions;
  38. extern struct session *sessions;
  39. extern struct session *current;
  40. struct session *newsession();
  41.  
  42. extern int16 lport;
  43.